import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: Home
    },
    {
        path:'/search',
        name:'搜索',
        component:()=>import('../views/search/index')
    },
    {//购物车
        path: '/cart',
        name: '购物车',
        component: () => import('../views/cart/index')
    },
    {//景点门票
        path: '/tickets',
        name: '景点门票',
        component:() => import('../views/tickets/index')
    },
    {//门票详情
        path: '/tickets/details',
        name: '门票详情',
        component:() => import('../views/tickets/spikeDetails')
    },
    {//门票确认订单
        path: '/tickets/confirmOrder',
        name: '确认订单',
        component:() => import('../views/tickets/confirmOrder')
    },
    {//修改用户信息
        path: '/tickets/modifyInfo',
        name: '修改信息',
        component:() => import('../views/tickets/modifyInfo')
    },
    {//商品详情
        path: '/product/details',
        name: '门票详情',
        component:() => import('../views/product/details')
    },
    {//商品列表
        path: '/product',
        name: '门票详情',
        component:() => import('../views/product/index')
    },
    {//商品列表
        path: '/spike',
        name: '秒杀列表',
        component:() => import('../views/spike/index')
    },
    {//秒杀商品列表spike
        path: '/product/spikeDetails',
        name: '秒杀门票详情',
        component:() => import('../views/product/spikeDetails')
    },
    {//商品确认订单
        path: '/product/confirmOrder/:id',
        name: '确认订单',
        component:() => import('../views/product/confirmOrder')
    },
    {//修改配送方式
        path: '/product/selectDelivery/:id',
        name: '修改信息',
        component:() => import('../views/product/selectDelivery')
    },
    {//收货地址
        path: '/address/index',
        name: '新增收货地址',
        component:() => import('../views/address/index')
    },
    {//新增收货地址
        path: '/address/add',
        name: '新增收货地址',
        component:() => import('../views/address/add')
    },
    {//我的
        path: '/mine',
        name: '我的',
        component:() => import('../views/mine/index')
    },
    {//我的收藏
        path: '/mine/collection',
        name: '我的收藏',
        component:() => import('../views/mine/collection')
    },
    {//设置
        path: '/mine/set',
        name: '设置',
        component:() => import('../views/mine/set')
    },
    {//意见反馈
        path: '/mine/feedback',
        name: '意见反馈',
        component:() => import('../views/mine/feedback')
    },
    {//我的分享
        path: '/mine/share',
        name: '我的分享',
        component:() => import('../views/mine/share')
    },
    {//我的邀请
        path: '/mine/invite',
        name: '我的分享',
        component:() => import('../views/mine/invite')
    },
    {//赚钱计划
        path: '/mine/makeMoney',
        name: '赚钱计划',
        component:() => import('../views/mine/makeMoney/plan')
    },
    {//我的收益
        path: '/mine/income',
        name: '我的收益',
        component:() => import('../views/mine/income/index')
    },
    {//我的收益-提现
        path: '/mine/income/cash',
        name: '我的收益-提现',
        component:() => import('../views/mine/income/cash')
    },
    {//我的订单
        path: '/mine/order',
        name: '我的订单',
        component:() => import('../views/mine/order/index')
    },
    {//我订单详情
        path: '/mine/order/details',
        name: '订单详情',
        component:() => import('../views/mine/order/details')
    },
    {//我订单详情
        path: '/mine/order/ticketsDetails',
        name: '订单详情',
        component:() => import('../views/mine/order/ticketsDetails')
    },
    {//申请退款
        path: '/mine/order/refund',
        name: '申请退款',
        component:() => import('../views/mine/order/refund/index')
    },
    {//退款申请
        path: '/mine/order/refund/details',
        name: '退款申请',
        component:() => import('../views/mine/order/refund/details')
    },
    {//支付成功
        path: '/paymentResult/success',
        name: '支付成功',
        component:() => import('../views/paymentResult/success')
    },
    {//支付失败
        path: '/paymentResult/failure',
        name: '支付失败',
        component:() => import('../views/paymentResult/failure')
    },
    {//推广海报
        path: '/mine/poster',
        name: '推广海报',
        component:() => import('../views/mine/poster/index')
    },
    {//海报
        path: '/mine/poster/banner',
        name: '海报',
        component:() => import('../views/mine/poster/banner')
    }
]

const router = new VueRouter({
    routes
})

export default router
